package fr.mehfile.view;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import fr.mehfile.R;

public class NousContacter  extends Activity implements View.OnClickListener {

	
	@Override
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		setContentView(R.layout.nouscontacter);
		
		ImageView secretaryImageView = (ImageView) findViewById(R.id.secretary);
		secretaryImageView.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				sendEmail("mz.programme@gmail.com", "Renseignements");
				
			}
		});
		ImageView majalissImageView = (ImageView) findViewById(R.id.majaliss);
		majalissImageView.setOnClickListener(new View.OnClickListener() {
			
			public void onClick(View v) {
				sendEmail("mz.programme@gmail.com", "Souscription d\'un majaliss");
				
			}
		});
		
	
	}
	
	private void sendEmail(String mail, String objet){
		final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);        
		emailIntent.setType("plain/text"); 				
		emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{mail}); 
		emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, objet); 
		emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, ""); 
		startActivity(Intent.createChooser(emailIntent, "Sending mail..."));


	}

	public void onClick(View v) {
		
		
	}

}
